home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / c_lib.arc / UTSLMOVE.C < prev   
Text File  |  1990-08-09  |  2KB  |  43 lines

  1. /**
  2. *
  3. * Name          utslmove -- Move bytes from one segment address to another
  4. *
  5. * Synopsis      iret = utslmove(psource,ptarget,cnt);
  6. *               int iret          Return value is always 0
  7. *               ADS *psource      Pointer to segment,offset address of the
  8. *                                 memory location to move.
  9. *               ADS *ptarget      Pointer to segment,offset address of the
  10. *                                 memory location to receive the data.
  11. *               unsigned cnt      Number of bytes to move
  12. *
  13. * Description   This function moves blocks of storage from one location
  14. *               to another, where the locations are given by segment, offset
  15. *               addresses.  This allows access to the memory in the entire
  16. *               machine.  The address type is a structure whose components
  17. *               are unsigned representing segment and relative addresses.
  18. *               Pointers are passed as parameters because structures cannot
  19. *               be passed.  The actual move is made by calling the assembler
  20. *               routine movesl, which moves the data from "left" to "right"
  21. *               using the movsb instruction.
  22. *
  23. * Returns       No values are returned (the functional value is always 0).
  24. *               The pointers psource and ptarget are not altered.
  25. *
  26. * Version       1.1 (C)Copyright Blaise Computing Inc.  1983, 1984
  27. *
  28. **/
  29. int utslmove(psource,ptarget,cnt)
  30. struct address
  31.        {
  32.          unsigned r;
  33.          unsigned s;
  34.        } *psource,*ptarget;
  35. unsigned cnt;
  36. {
  37.  
  38.     movesl(psource->s,psource->r,ptarget->s,ptarget->r,cnt);
  39.  
  40.     return(0);
  41.  
  42. }
  43.